#pragma once

#include "CXcpObjectBase.h"
#include "ITransformer.h"

#include "CMILMatrix.h"
#include "CXcpObjectThreadSafeAddRefPolicy.h"

class CTransformer :
	public CXcpObjectBase<ITransformer,CXcpObjectThreadSafeAddRefPolicy>
{

protected: 
	CTransformer();
	virtual ~CTransformer();
public: 
	virtual HRESULT Transform(const struct XPOINTF * pSrcPoints, struct XPOINTF * pDestPoints, XUINT32 uiCount);
	virtual HRESULT ReverseTransform(const struct XPOINTF * pSrcPoints, struct XPOINTF * pDestPoints, XUINT32 uiCount);
	virtual enum ITransformer::TransformerType GetType();
	virtual XBOOL IsPure2D();
	virtual CMILMatrix Get2DMatrix();
	static HRESULT TransformBounds(struct ITransformer * pTransformer, const struct XRECTF_WH * pSource, struct XRECTF_WH * pTarget, XBOOL bReverse);
};